package com.winglish.as3.exam.toeic.vo 
{
	import flash.display.MovieClip;
	import flash.display.SimpleButton;
	import flash.text.TextField;
	
	import com.winglish.as3.utils.ObjectUtil;
	
	/**
	 * ...
	 * @author charmjin
	 */
	public class Omr extends MovieClip 
	{
		public var noTxt:TextField;
		public var itemMc0:MovieClip;
		public var itemMc1:MovieClip;
		public var itemMc2:MovieClip;
		public var itemMc3:MovieClip;
		public var btn:SimpleButton;
		
		public function Omr() 
		{
		}
		
		/**
		 * 버튼 매핑.
		 * @param	path
		 */
		public function mapping(path:MovieClip):void {
			var arr:Array = new Array();
			arr = ObjectUtil.traceDisplayList(path);
			for each (var i:String in arr) 
			{
				try {
					if (i.indexOf("Mc") != -1 ) {
						this[i] = new MovieClip();
					}else if (i.indexOf("Txt") != -1) {
						this[i] = new TextField();
					}else if (i.indexOf("Btn") != -1) {
						this[i] = new SimpleButton();
					}
					this[i] = path[i];
				}catch (e:Error) {
					//trace(i + " not find MovieClip" );
				}
			}
		}
		
	}

}